mainApp.service('shopingCartService', ['$resource',function ($resource){
    
    //查询登录用户购物车信息
    this.getShopingCartList = function(success,error){
        return $resource(baseUrl+"/mapi/mshopingcart/getList").get(success,error);
    };
  	//修改产品购买数量
    this.updateShopingCartNumber = function(goodsId,number,success,error){
        return $resource(baseUrl+"/mapi/mshopingcart/updateNumber/:goodsId/:number",{goodsId:goodsId,number:number}).get(success,error);
    };
    //删除购物车商品信息
    this.deleteShopingCartGoods = function(goodsId,goodsWeightId,success,error){
        return $resource(baseUrl+"/mapi/mshopingcart/delete/:goodsId/:goodsWeightId",{goodsId:goodsId,goodsWeightId:goodsWeightId}).get(success,error);
    };
    //生成订单
    this.addOrderDetail = function(orderDetail,success,error){
        return $resource(baseUrl+"/mapi/morder/add").save(orderDetail,success,error);
    };
}]);
